package com.zhouchb.stream;

import java.net.InetAddress;
import java.net.UnknownHostException;

/**
 * @Author Zhouchb
 * @Create 2021-11-2021/11/1 :21:16
 * @Description
 */
public class InetAddressTest {
    public static void main(String[] args) {
        InetAddress byAddress = null;
        try {
            byAddress = InetAddress.getByName("www.atguigu.com");
            InetAddress localHost = InetAddress.getLocalHost();
            System.out.println(byAddress);
            System.out.println(localHost);
        } catch (UnknownHostException e) {
            e.printStackTrace();
        }
    }
}
